<!DOCTYPE html>
<html>
<head><meta name="generator" content="Hexo 3.9.0">
  <meta charset="utf-8">
  
  <title>hexo</title>
  <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
  <meta property="og:type" content="website">
<meta property="og:title" content="hexo">
<meta property="og:url" content="http://yoursite.com/index.html">
<meta property="og:site_name" content="hexo">
<meta property="og:locale" content="default">
<meta name="twitter:card" content="summary">
<meta name="twitter:title" content="hexo">
  
    <link rel="alternate" href="/atom.xml" title="hexo" type="application/atom+xml">
  
  
    <link rel="icon" href="/favicon.ico">
  
  
    
  
  <link rel="stylesheet" href="/css/style.css">
  

</head>
</html>
<body>
  <div id="container">
    <div id="wrap">
      <header id="header">
  <div id="banner"></div>
  <div id="header-outer" class="outer">
    
    <div id="header-inner" class="inner">
      <nav id="sub-nav">
        
          <a id="nav-rss-link" class="nav-icon" href="/atom.xml" title="RSS Feed"></a>
        
        <a id="nav-search-btn" class="nav-icon" title="搜索"></a>
      </nav>
      <div id="search-form-wrap">
        <form action="//google.com/search" method="get" accept-charset="UTF-8" class="search-form"><input type="search" name="q" class="search-form-input" placeholder="Search"><button type="submit" class="search-form-submit">&#xF002;</button><input type="hidden" name="sitesearch" value="http://yoursite.com"></form>
      </div>
      <nav id="main-nav">
        <a id="main-nav-toggle" class="nav-icon"></a>
        
          <a class="main-nav-link" href="/">首页</a>
        
          <a class="main-nav-link" href="/archives">归档</a>
        
          <a class="main-nav-link" href="/categories/高等数学">高等数学</a>
        
          <a class="main-nav-link" href="/categories/线性代数">线性代数</a>
        
          <a class="main-nav-link" href="/categories/数据结构与算法">数据结构与算法</a>
        
          <a class="main-nav-link" href="/categories/English">英语</a>
        
          <a class="main-nav-link" href="/about">关于</a>
        
      </nav>
      
    </div>
    <div id="header-title" class="inner">
      <h1 id="logo-wrap">
        <a href="/" id="logo">hexo</a>
      </h1>
      
    </div>
  </div>
</header>
      <div class="outer">
        <section id="main">
  
    <article id="post-数据结构与算法设计/小甲鱼/查找" class="article article-type-post" itemscope itemprop="blogPost">
  <div class="article-meta">
    <a href="/2019/08/12/数据结构与算法设计/小甲鱼/查找/" class="article-date">
  <time datetime="2019-08-12T01:29:39.000Z" itemprop="datePublished">2019-08-12</time>
</a>
    
  <div class="article-category">
    <a class="article-category-link" href="/categories/数据结构与算法/">数据结构与算法</a>►<a class="article-category-link" href="/categories/数据结构与算法/小甲鱼/">小甲鱼</a>
  </div>

  </div>
  <div class="article-inner">
    
    
      <header class="article-header">
        
  
    <h1 itemprop="name">
      <a class="article-title" href="/2019/08/12/数据结构与算法设计/小甲鱼/查找/">查找</a>
    </h1>
  

      </header>
    
    <div class="article-entry" itemprop="articleBody">
      
        <!-- Table of Contents -->
        
        <h2 id="查找分类"><a href="#查找分类" class="headerlink" title="查找分类"></a>查找分类</h2><pre class="mermaid">graph LR
A(查找)==>B(静态查找表)
A==>C(动态查找表)</pre>

<h2 id="查找结构"><a href="#查找结构" class="headerlink" title="查找结构"></a>查找结构</h2><pre class="mermaid">graph LR
A(查找结构)==静态查找==>B(线性表)
B==>C(顺序查找/折半查找)
A==动态查找==>D(树表)
D==>E(二叉排序树)
A==两者均适用==>F(散列表)</pre>

<h2 id="顺序查找"><a href="#顺序查找" class="headerlink" title="顺序查找"></a>顺序查找</h2><p>设第i次查找次数为$C_i$ ,该$ C_i $次数的查找概率 $P_i$ ,则 </p>
<script type="math/tex; mode=display">
ASL = \sum_{i=1}^n C_iP_i \\

ASL = \sum_{i=1}^n n \times \frac{1}{n} = \frac{n+1}{2} (查找概率相等) \\

ASL = \frac{n/2+1}{2} +  \sum_{i=1}^{n/2} n \times 1/2 =  \frac{n/2+1}{2} + n/2 (成功失败概率相等)</script>
      
    </div>
    <footer class="article-footer">
      <a data-url="http://yoursite.com/2019/08/12/数据结构与算法设计/小甲鱼/查找/" data-id="cjz7utmot001axhpeaz65tl9u" class="article-share-link">分享</a>
      
      
      
    </footer>
  </div>
  
</article>
 


  
    <article id="post-数据结构与算法设计/小甲鱼/二叉树" class="article article-type-post" itemscope itemprop="blogPost">
  <div class="article-meta">
    <a href="/2019/08/05/数据结构与算法设计/小甲鱼/二叉树/" class="article-date">
  <time datetime="2019-08-05T02:00:14.000Z" itemprop="datePublished">2019-08-05</time>
</a>
    
  <div class="article-category">
    <a class="article-category-link" href="/categories/数据结构与算法/">数据结构与算法</a>►<a class="article-category-link" href="/categories/数据结构与算法/小甲鱼/">小甲鱼</a>
  </div>

  </div>
  <div class="article-inner">
    
    
      <header class="article-header">
        
  
    <h1 itemprop="name">
      <a class="article-title" href="/2019/08/05/数据结构与算法设计/小甲鱼/二叉树/">二叉树</a>
    </h1>
  

      </header>
    
    <div class="article-entry" itemprop="articleBody">
      
        <!-- Table of Contents -->
        
        <h2 id=""><a href="#" class="headerlink" title=" "></a> </h2>
      
    </div>
    <footer class="article-footer">
      <a data-url="http://yoursite.com/2019/08/05/数据结构与算法设计/小甲鱼/二叉树/" data-id="cjz7utmor0014xhpewyjuu5jx" class="article-share-link">分享</a>
      
      
      
    </footer>
  </div>
  
</article>
 


  
    <article id="post-数据结构与算法设计/小甲鱼/树" class="article article-type-post" itemscope itemprop="blogPost">
  <div class="article-meta">
    <a href="/2019/08/05/数据结构与算法设计/小甲鱼/树/" class="article-date">
  <time datetime="2019-08-05T01:33:41.000Z" itemprop="datePublished">2019-08-05</time>
</a>
    
  <div class="article-category">
    <a class="article-category-link" href="/categories/数据结构与算法/">数据结构与算法</a>►<a class="article-category-link" href="/categories/数据结构与算法/小甲鱼/">小甲鱼</a>
  </div>

  </div>
  <div class="article-inner">
    
    
      <header class="article-header">
        
  
    <h1 itemprop="name">
      <a class="article-title" href="/2019/08/05/数据结构与算法设计/小甲鱼/树/">树</a>
    </h1>
  

      </header>
    
    <div class="article-entry" itemprop="articleBody">
      
        <!-- Table of Contents -->
        
        <h2 id="基本属性"><a href="#基本属性" class="headerlink" title="基本属性"></a>基本属性</h2><pre class="mermaid">graph LR;
A(树)==>B(节点)
B==>C(根)
B==>E(分支节点)
B==>D(叶子)

A==>F(宏观)
F==>H(度--所有节点的度的最大值)
F==>G(深度/高度)
F==>I(路径--每个节点路径唯一)</pre>

<h2 id="节点关系"><a href="#节点关系" class="headerlink" title="节点关系"></a>节点关系</h2><pre class="mermaid">graph LR;

A(节点关系)==>E(祖先节点)
A==>B(双亲节点)
A==>C(兄弟节点)
A==>D(子孙节点)</pre>

<h2 id="链式存储结构"><a href="#链式存储结构" class="headerlink" title="链式存储结构"></a>链式存储结构</h2><h3 id="二叉树表示法-重点"><a href="#二叉树表示法-重点" class="headerlink" title="二叉树表示法 (重点)"></a>二叉树表示法 (重点)</h3><pre class="mermaid">graph LR;
A(节点结构)==>B(数据 data)
A==>C(长子节点 first_child)
A==>D(次兄弟节点 nextsibling)</pre>

<h3 id="孩子链表表示"><a href="#孩子链表表示" class="headerlink" title="孩子链表表示"></a>孩子链表表示</h3><pre class="mermaid">graph LR;
A(节点结构)==>B(数据 data)
A==>C(孩子链表 childs list)</pre>

<h3 id="孩子双亲链表表示"><a href="#孩子双亲链表表示" class="headerlink" title="孩子双亲链表表示"></a>孩子双亲链表表示</h3><pre class="mermaid">graph LR;
A(节点结构)==>B(数据 data)
A==>D(双亲 parent)
A==>C(孩子链表 childs list)</pre>
      
    </div>
    <footer class="article-footer">
      <a data-url="http://yoursite.com/2019/08/05/数据结构与算法设计/小甲鱼/树/" data-id="cjz7utmow001kxhpezfyfn620" class="article-share-link">分享</a>
      
      
      
  <ul class="article-tag-list"><li class="article-tag-list-item"><a class="article-tag-list-link" href="/tags/度/">度</a></li><li class="article-tag-list-item"><a class="article-tag-list-link" href="/tags/路径/">路径</a></li></ul>

    </footer>
  </div>
  
</article>
 


  
    <article id="post-English/Writer/money" class="article article-type-post" itemscope itemprop="blogPost">
  <div class="article-meta">
    <a href="/2019/07/29/English/Writer/money/" class="article-date">
  <time datetime="2019-07-29T03:05:30.000Z" itemprop="datePublished">2019-07-29</time>
</a>
    
  <div class="article-category">
    <a class="article-category-link" href="/categories/English/">English</a>►<a class="article-category-link" href="/categories/English/Writer/">Writer</a>
  </div>

  </div>
  <div class="article-inner">
    
    
      <header class="article-header">
        
  
    <h1 itemprop="name">
      <a class="article-title" href="/2019/07/29/English/Writer/money/">money</a>
    </h1>
  

      </header>
    
    <div class="article-entry" itemprop="articleBody">
      
        <!-- Table of Contents -->
        
        <p>In the picture, a lady is hugging and kissing a man, who is covered with U.S dollar bills.Underneath the picture, the caption reads “Love him or his money ?” The picture gives a description of the superficialness of some materialistic-minded girls, who only see love as a means to wealth. To them, romantic love is less desirable than “all-powerful” money</p>
<hr>
<p>superficialness 肤浅</p>
<p>His comprehension is very superficialness.</p>
<p>materialistic</p>
<p>During the 1980s, the U.S became a very materialistic society</p>
<p>desirable</p>
<p>Prolonged negotiation was not desirable.拖得很长的谈判是不受欢迎的</p>
<p>the desirability of democratic reform …民主改革的可取性</p>
<hr>

      
    </div>
    <footer class="article-footer">
      <a data-url="http://yoursite.com/2019/07/29/English/Writer/money/" data-id="cjz7utmoh000jxhpe6jfiati0" class="article-share-link">分享</a>
      
      
      
    </footer>
  </div>
  
</article>
 


  
    <article id="post-English/Words/theme-words" class="article article-type-post" itemscope itemprop="blogPost">
  <div class="article-meta">
    <a href="/2019/07/29/English/Words/theme-words/" class="article-date">
  <time datetime="2019-07-29T01:22:55.000Z" itemprop="datePublished">2019-07-29</time>
</a>
    
  <div class="article-category">
    <a class="article-category-link" href="/categories/English/">English</a>►<a class="article-category-link" href="/categories/English/Words/">Words</a>
  </div>

  </div>
  <div class="article-inner">
    
    
      <header class="article-header">
        
  
    <h1 itemprop="name">
      <a class="article-title" href="/2019/07/29/English/Words/theme-words/">theme_words</a>
    </h1>
  

      </header>
    
    <div class="article-entry" itemprop="articleBody">
      
        <!-- Table of Contents -->
        
        <h2 id="society-life"><a href="#society-life" class="headerlink" title="society life"></a>society life</h2><p>object poverty</p>
<p>undergo a drastic transformation</p>
<p>harmonious society</p>
<p>traffic congestion</p>
<p>unfair competition</p>
<p>justified measure</p>
<p>information era</p>
<p>prime time</p>
<p>community</p>
<p>independent</p>
<p>population explosion</p>
<h2 id="ethics-value"><a href="#ethics-value" class="headerlink" title="ethics / value"></a>ethics / value</h2><p>business ethics</p>
<p>professional ethics</p>

      
    </div>
    <footer class="article-footer">
      <a data-url="http://yoursite.com/2019/07/29/English/Words/theme-words/" data-id="cjz7utmok000mxhpeoyg1znzs" class="article-share-link">分享</a>
      
      
      
    </footer>
  </div>
  
</article>
 


  
    <article id="post-编程语言/c++/const总结" class="article article-type-post" itemscope itemprop="blogPost">
  <div class="article-meta">
    <a href="/2019/07/22/编程语言/c++/const总结/" class="article-date">
  <time datetime="2019-07-22T09:00:28.000Z" itemprop="datePublished">2019-07-22</time>
</a>
    
  <div class="article-category">
    <a class="article-category-link" href="/categories/编程语言/">编程语言</a>►<a class="article-category-link" href="/categories/编程语言/c/">c++</a>
  </div>

  </div>
  <div class="article-inner">
    
    
      <header class="article-header">
        
  
    <h1 itemprop="name">
      <a class="article-title" href="/2019/07/22/编程语言/c++/const总结/">const总结</a>
    </h1>
  

      </header>
    
    <div class="article-entry" itemprop="articleBody">
      
        <!-- Table of Contents -->
        
        <h2 id="常量"><a href="#常量" class="headerlink" title="常量"></a>常量</h2><p>不可再次更改变量值</p>
<figure class="highlight c++"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line"><span class="keyword">const</span> <span class="keyword">int</span> a = <span class="number">1</span>;</span><br></pre></td></tr></table></figure>
<h2 id="常成员函数"><a href="#常成员函数" class="headerlink" title="常成员函数"></a>常成员函数</h2><p>不可修改类成员变量</p>
<figure class="highlight c++"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br><span class="line">10</span><br><span class="line">11</span><br><span class="line">12</span><br><span class="line">13</span><br><span class="line">14</span><br><span class="line">15</span><br><span class="line">16</span><br><span class="line">17</span><br><span class="line">18</span><br></pre></td><td class="code"><pre><span class="line"><span class="class"><span class="keyword">class</span> <span class="title">A</span></span></span><br><span class="line"><span class="class">&#123;</span></span><br><span class="line">    <span class="keyword">private</span>:</span><br><span class="line">        <span class="keyword">int</span> a;</span><br><span class="line">    <span class="keyword">public</span>:</span><br><span class="line">        <span class="function"><span class="keyword">void</span> <span class="title">f1</span><span class="params">(<span class="keyword">int</span> arg)</span> <span class="keyword">const</span><span class="comment">// 常成员函数</span></span></span><br><span class="line"><span class="function">        </span>&#123;</span><br><span class="line">            <span class="built_in">cout</span> &lt;&lt; <span class="string">"variable :"</span>;</span><br><span class="line">            <span class="built_in">cout</span> &lt;&lt; arg &lt;&lt; <span class="built_in">endl</span>;</span><br><span class="line">            <span class="comment">// a = 100; //error</span></span><br><span class="line">            <span class="built_in">cout</span> &lt;&lt; a &lt;&lt; <span class="built_in">endl</span>;</span><br><span class="line">        &#125;</span><br><span class="line">        <span class="function"><span class="keyword">void</span> <span class="title">f2</span><span class="params">(<span class="keyword">const</span> <span class="keyword">int</span> i)</span> </span>&#123;</span><br><span class="line">            <span class="comment">// i = 10000;//error  </span></span><br><span class="line">            <span class="built_in">cout</span> &lt;&lt; i &lt;&lt; <span class="built_in">endl</span>;</span><br><span class="line">        &#125;</span><br><span class="line"></span><br><span class="line">&#125;;</span><br></pre></td></tr></table></figure>
<h2 id="限定不可修改函数参数"><a href="#限定不可修改函数参数" class="headerlink" title="限定不可修改函数参数"></a>限定不可修改函数参数</h2><figure class="highlight c++"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br></pre></td><td class="code"><pre><span class="line"><span class="function"><span class="keyword">void</span> <span class="title">f2</span><span class="params">(<span class="keyword">const</span> <span class="keyword">int</span> i)</span> </span>&#123;</span><br><span class="line">       i = <span class="number">10000</span>; <span class="comment">// error</span></span><br><span class="line">       <span class="built_in">cout</span> &lt;&lt; i &lt;&lt; <span class="built_in">endl</span>;</span><br><span class="line">   &#125;</span><br></pre></td></tr></table></figure>
<h2 id="限定const对象只能调用const成员函数"><a href="#限定const对象只能调用const成员函数" class="headerlink" title="限定const对象只能调用const成员函数"></a>限定const对象只能调用const成员函数</h2><figure class="highlight c++"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br></pre></td><td class="code"><pre><span class="line"><span class="keyword">const</span> A obj2;</span><br><span class="line">obj2.f1(<span class="number">999</span>);</span><br><span class="line"><span class="comment">// obj2.f2(666);// error !!!</span></span><br></pre></td></tr></table></figure>
<h2 id="限定不可更改的指针"><a href="#限定不可更改的指针" class="headerlink" title="限定不可更改的指针"></a>限定不可更改的指针</h2><figure class="highlight c++"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br></pre></td><td class="code"><pre><span class="line"><span class="keyword">int</span> i = <span class="number">1000</span>;</span><br><span class="line"><span class="keyword">int</span> *<span class="keyword">const</span> p2 = &amp;i;</span><br><span class="line"><span class="built_in">cout</span> &lt;&lt; *p2 &lt;&lt; <span class="built_in">endl</span>;</span><br><span class="line"><span class="keyword">int</span> j = <span class="number">300</span>;</span><br><span class="line"><span class="comment">// p2 = &amp;j; // error !!!!!!!</span></span><br><span class="line"><span class="comment">// cout &lt;&lt; *p2 &lt;&lt; endl;</span></span><br></pre></td></tr></table></figure>

      
    </div>
    <footer class="article-footer">
      <a data-url="http://yoursite.com/2019/07/22/编程语言/c++/const总结/" data-id="cjz7utmp6002mxhpelybi9jfk" class="article-share-link">分享</a>
      
      
      
    </footer>
  </div>
  
</article>
 


  
    <article id="post-English/Writer/quotes" class="article article-type-post" itemscope itemprop="blogPost">
  <div class="article-meta">
    <a href="/2019/07/20/English/Writer/quotes/" class="article-date">
  <time datetime="2019-07-20T10:33:14.000Z" itemprop="datePublished">2019-07-20</time>
</a>
    
  <div class="article-category">
    <a class="article-category-link" href="/categories/English/">English</a>►<a class="article-category-link" href="/categories/English/Words/">Words</a>
  </div>

  </div>
  <div class="article-inner">
    
    
      <header class="article-header">
        
  
    <h1 itemprop="name">
      <a class="article-title" href="/2019/07/20/English/Writer/quotes/">quotes</a>
    </h1>
  

      </header>
    
    <div class="article-entry" itemprop="articleBody">
      
        <!-- Table of Contents -->
        
        <h2 id="Deligent-Will-Success"><a href="#Deligent-Will-Success" class="headerlink" title="Deligent , Will , Success"></a>Deligent , Will , Success</h2><p>Where there is a will, there is a way</p>
<p>No pains , no gains</p>
<p>Constant dripping wears away a stone</p>
<p>Care and diligence bring luck</p>
<h2 id="Learning-method-Attitude"><a href="#Learning-method-Attitude" class="headerlink" title="Learning method, Attitude"></a>Learning method, Attitude</h2><p>Practice makes perfect</p>
<p>It’s never too old to learn</p>
<p>Reading is to the mind while exercise to the body</p>
<p>A man becomes learned by asking questions</p>
<p>//Learn and live</p>
<p>Knowledge starts with practice</p>

      
    </div>
    <footer class="article-footer">
      <a data-url="http://yoursite.com/2019/07/20/English/Writer/quotes/" data-id="cjz7utmoi000kxhpebp9nyxh4" class="article-share-link">分享</a>
      
      
      
    </footer>
  </div>
  
</article>
 


  
    <article id="post-数据结构与算法设计/小甲鱼/线性表" class="article article-type-post" itemscope itemprop="blogPost">
  <div class="article-meta">
    <a href="/2019/07/19/数据结构与算法设计/小甲鱼/线性表/" class="article-date">
  <time datetime="2019-07-19T10:11:25.000Z" itemprop="datePublished">2019-07-19</time>
</a>
    
  <div class="article-category">
    <a class="article-category-link" href="/categories/数据结构与算法/">数据结构与算法</a>►<a class="article-category-link" href="/categories/数据结构与算法/小甲鱼/">小甲鱼</a>
  </div>

  </div>
  <div class="article-inner">
    
    
      <header class="article-header">
        
  
    <h1 itemprop="name">
      <a class="article-title" href="/2019/07/19/数据结构与算法设计/小甲鱼/线性表/">线性表</a>
    </h1>
  

      </header>
    
    <div class="article-entry" itemprop="articleBody">
      
        <!-- Table of Contents -->
        
        <h2 id="定义"><a href="#定义" class="headerlink" title="定义"></a>定义</h2><p>0个或多个数据元素组成的有限序列</p>
<pre class="mermaid">graph LR;
A(线性表)==>B(顺序表)
A==>C(链式表)

B==>J(一段连续的内存空间)
B==>D(优点)
D==>F(节省内存空间)
D==>E(随机存取)

C==>K(数据域+指针域)
C==>I(优点)
I==>G(随机删除)
I==>H(节省表容量)</pre>



<pre class="mermaid">graph LR;

A(链式表)==>B(单链表)
A==>C(静态链表)
A==>D(双向链表)
A==>E(循环链表)</pre>








      
    </div>
    <footer class="article-footer">
      <a data-url="http://yoursite.com/2019/07/19/数据结构与算法设计/小甲鱼/线性表/" data-id="cjz7utmow001mxhpeai2yrozm" class="article-share-link">分享</a>
      
      
      
    </footer>
  </div>
  
</article>
 


  
    <article id="post-数据结构与算法设计/小甲鱼/时间复杂度" class="article article-type-post" itemscope itemprop="blogPost">
  <div class="article-meta">
    <a href="/2019/07/19/数据结构与算法设计/小甲鱼/时间复杂度/" class="article-date">
  <time datetime="2019-07-19T04:37:52.000Z" itemprop="datePublished">2019-07-19</time>
</a>
    
  <div class="article-category">
    <a class="article-category-link" href="/categories/数据结构与算法/">数据结构与算法</a>►<a class="article-category-link" href="/categories/数据结构与算法/小甲鱼/">小甲鱼</a>
  </div>

  </div>
  <div class="article-inner">
    
    
      <header class="article-header">
        
  
    <h1 itemprop="name">
      <a class="article-title" href="/2019/07/19/数据结构与算法设计/小甲鱼/时间复杂度/">时间复杂度</a>
    </h1>
  

      </header>
    
    <div class="article-entry" itemprop="articleBody">
      
        <!-- Table of Contents -->
        
        <pre class="mermaid">graph LR;
A(时间复杂度)==常数阶==>B("O(1)")
A==对数阶==>E("log(n)"  )
A==线性阶==>C("O(n)")
A==nlog n==>D("nlog(n)")
A==平方阶==>F("O(n^2)")
A==指数阶==>G("O(a^n)")
A==阶乘==>I("O(n!)")
A== n数幂阶 ==>H("O(n^n)")</pre>

<p>$O(n^3)$ 之后的 随n的增大, 复杂度超乎想象</p>
<p>==算法复杂度:  算法最坏情况下的运行时间==</p>
<p>时间复杂度: 指令的运行次数</p>
<p>空间复杂度: 运行代码的内存空间需求</p>

      
    </div>
    <footer class="article-footer">
      <a data-url="http://yoursite.com/2019/07/19/数据结构与算法设计/小甲鱼/时间复杂度/" data-id="cjz7utmou001exhpe6inyd7ts" class="article-share-link">分享</a>
      
      
      
  <ul class="article-tag-list"><li class="article-tag-list-item"><a class="article-tag-list-link" href="/tags/时间复杂度/">时间复杂度</a></li></ul>

    </footer>
  </div>
  
</article>
 


  
    <article id="post-编程语言/c++/指针" class="article article-type-post" itemscope itemprop="blogPost">
  <div class="article-meta">
    <a href="/2019/07/09/编程语言/c++/指针/" class="article-date">
  <time datetime="2019-07-09T03:11:19.000Z" itemprop="datePublished">2019-07-09</time>
</a>
    
  <div class="article-category">
    <a class="article-category-link" href="/categories/编程语言/">编程语言</a>►<a class="article-category-link" href="/categories/编程语言/c/">c++</a>
  </div>

  </div>
  <div class="article-inner">
    
    
      <header class="article-header">
        
  
    <h1 itemprop="name">
      <a class="article-title" href="/2019/07/09/编程语言/c++/指针/">指针</a>
    </h1>
  

      </header>
    
    <div class="article-entry" itemprop="articleBody">
      
        <!-- Table of Contents -->
        
        <h2 id="指针"><a href="#指针" class="headerlink" title="指针"></a>指针</h2><p><strong>指针</strong>是一个变量，其值为另一个变量的地址，即，内存位置的直接地址。</p>
<figure class="highlight c++"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br></pre></td><td class="code"><pre><span class="line"><span class="keyword">int</span>    *ip;    <span class="comment">/* 一个整型的指针 */</span></span><br><span class="line"><span class="keyword">double</span> *dp;    <span class="comment">/* 一个 double 型的指针 */</span></span><br><span class="line"><span class="keyword">float</span>  *fp;    <span class="comment">/* 一个浮点型的指针 */</span></span><br><span class="line"><span class="keyword">char</span>   *ch;    <span class="comment">/* 一个字符型的指针 */</span></span><br></pre></td></tr></table></figure>
<h2 id="NULL"><a href="#NULL" class="headerlink" title="NULL"></a>NULL</h2><figure class="highlight c++"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line"><span class="keyword">int</span>  *ptr = <span class="literal">NULL</span>;</span><br></pre></td></tr></table></figure>

      
    </div>
    <footer class="article-footer">
      <a data-url="http://yoursite.com/2019/07/09/编程语言/c++/指针/" data-id="cjz7utmp9002wxhpewaijyp6i" class="article-share-link">分享</a>
      
      
      
    </footer>
  </div>
  
</article>
 


  


  <nav id="page-nav">
    <span class="page-number current">1</span><a class="page-number" href="/page/2/">2</a><a class="page-number" href="/page/3/">3</a><span class="space">&hellip;</span><a class="page-number" href="/page/5/">5</a><a class="extend next" rel="next" href="/page/2/">下一页&raquo;</a>
  </nav>
</section>
           
    <aside id="sidebar">
  
    
  <div class="widget-wrap">
     
        <h3 class="follow-title ">Follow me</h3>
     
    <div class="widget follow">
      
              <a class="github" aria-hidden="true" href="https://github.com/iguoya" target="_blank" title="Github"></a>
      
      
      
      
            <a class="email" aria-hidden="true"  href="mailto:375478250@qq.com" target="_blank" title="邮箱"></a>
      
    </div>
  </div>


  
    
  
    
  <div class="widget-wrap">
    <h3 class="widget-title categories">分类</h3>
    <div class="widget" id="categories">
      <ul class="category-list"><li class="category-list-item"><a class="category-list-link" href="/categories/English/">English</a><span class="category-list-count">13</span><ul class="category-list-child"><li class="category-list-item"><a class="category-list-link" href="/categories/English/Words/">Words</a><span class="category-list-count">7</span></li><li class="category-list-item"><a class="category-list-link" href="/categories/English/Writer/">Writer</a><span class="category-list-count">5</span></li></ul></li><li class="category-list-item"><a class="category-list-link" href="/categories/数据结构与算法/">数据结构与算法</a><span class="category-list-count">10</span><ul class="category-list-child"><li class="category-list-item"><a class="category-list-link" href="/categories/数据结构与算法/小甲鱼/">小甲鱼</a><span class="category-list-count">10</span></li></ul></li><li class="category-list-item"><a class="category-list-link" href="/categories/线性代数/">线性代数</a><span class="category-list-count">6</span><ul class="category-list-child"><li class="category-list-item"><a class="category-list-link" href="/categories/线性代数/实用大众线性代数/">实用大众线性代数</a><span class="category-list-count">5</span></li><li class="category-list-item"><a class="category-list-link" href="/categories/线性代数/汤家凤/">汤家凤</a><span class="category-list-count">1</span></li></ul></li><li class="category-list-item"><a class="category-list-link" href="/categories/编程语言/">编程语言</a><span class="category-list-count">6</span><ul class="category-list-child"><li class="category-list-item"><a class="category-list-link" href="/categories/编程语言/c/">c++</a><span class="category-list-count">6</span></li></ul></li><li class="category-list-item"><a class="category-list-link" href="/categories/高等数学/">高等数学</a><span class="category-list-count">5</span><ul class="category-list-child"><li class="category-list-item"><a class="category-list-link" href="/categories/高等数学/极限与连续/">极限与连续</a><span class="category-list-count">4</span></li></ul></li></ul>
    </div>
  </div>


  
    
  <div class="widget-wrap">
    <h3 class="widget-title tagcloud">标签云</h3>
    <div class="widget tagcloud">
      <a href="/tags/MATLAB/" style="font-size: 14px;">MATLAB</a> <a href="/tags/N项和求极限/" style="font-size: 14px;">N项和求极限</a> <a href="/tags/apprehension/" style="font-size: 14px;">apprehension</a> <a href="/tags/assumption/" style="font-size: 14px;">assumption</a> <a href="/tags/discourse/" style="font-size: 14px;">discourse</a> <a href="/tags/double/" style="font-size: 14px;">double</a> <a href="/tags/float/" style="font-size: 14px;">float</a> <a href="/tags/modern-day/" style="font-size: 14px;">modern-day</a> <a href="/tags/new-technology/" style="font-size: 14px;">new technology</a> <a href="/tags/permissive/" style="font-size: 14px;">permissive</a> <a href="/tags/professors/" style="font-size: 14px;">professors</a> <a href="/tags/rref/" style="font-size: 14px;">rref</a> <a href="/tags/scholarship/" style="font-size: 14px;">scholarship</a> <a href="/tags/size-t/" style="font-size: 14px;">size_t</a> <a href="/tags/transform/" style="font-size: 14px;">transform</a> <a href="/tags/ultimate/" style="font-size: 14px;">ultimate</a> <a href="/tags/undertake/" style="font-size: 14px;">undertake</a> <a href="/tags/uniform/" style="font-size: 14px;">uniform</a> <a href="/tags/venture/" style="font-size: 14px;">venture'</a> <a href="/tags/verdict/" style="font-size: 14px;">verdict</a> <a href="/tags/versus/" style="font-size: 14px;">versus</a> <a href="/tags/vessel/" style="font-size: 14px;">vessel</a> <a href="/tags/virtue/" style="font-size: 14px;">virtue</a> <a href="/tags/vision/" style="font-size: 14px;">vision</a> <a href="/tags/wchat-t/" style="font-size: 14px;">wchat_t</a> <a href="/tags/“习题”/" style="font-size: 14px;">“习题”</a> <a href="/tags/健壮性/" style="font-size: 14px;">健壮性</a> <a href="/tags/几何意义/" style="font-size: 14px;">几何意义</a> <a href="/tags/初等行变换/" style="font-size: 14px;">初等行变换</a> <a href="/tags/单位矩阵/" style="font-size: 14px;">单位矩阵</a> <a href="/tags/可行性/" style="font-size: 14px;">可行性</a> <a href="/tags/可读性/" style="font-size: 14px;">可读性</a> <a href="/tags/增广矩阵/" style="font-size: 14px;">增广矩阵</a> <a href="/tags/度/" style="font-size: 14px;">度</a> <a href="/tags/抽象数据类型/" style="font-size: 14px;">抽象数据类型</a> <a href="/tags/数学模型/" style="font-size: 14px;">数学模型</a> <a href="/tags/无穷小/" style="font-size: 14px;">无穷小</a> <a href="/tags/时间复杂度/" style="font-size: 14px;">时间复杂度</a> <a href="/tags/有穷性/" style="font-size: 14px;">有穷性</a> <a href="/tags/正确性/" style="font-size: 14px;">正确性</a> <a href="/tags/汇编/" style="font-size: 14px;">汇编</a> <a href="/tags/物理结构/" style="font-size: 14px;">物理结构</a> <a href="/tags/矩阵乘法/" style="font-size: 25px;">矩阵乘法</a> <a href="/tags/矩阵数乘/" style="font-size: 25px;">矩阵数乘</a> <a href="/tags/矩阵的秩/" style="font-size: 14px;">矩阵的秩</a> <a href="/tags/矩阵线性变换/" style="font-size: 25px;">矩阵线性变换</a> <a href="/tags/矩阵转置/" style="font-size: 14px;">矩阵转置</a> <a href="/tags/确定性/" style="font-size: 14px;">确定性</a> <a href="/tags/线性方程组/" style="font-size: 14px;">线性方程组</a> <a href="/tags/线性方程组解的类型/" style="font-size: 14px;">线性方程组解的类型</a> <a href="/tags/编译/" style="font-size: 14px;">编译</a> <a href="/tags/表/" style="font-size: 14px;">表</a> <a href="/tags/计算工具/" style="font-size: 14px;">计算工具</a> <a href="/tags/路径/" style="font-size: 14px;">路径</a> <a href="/tags/逆矩阵/" style="font-size: 25px;">逆矩阵</a> <a href="/tags/逻辑结构/" style="font-size: 14px;">逻辑结构</a> <a href="/tags/链接/" style="font-size: 14px;">链接</a> <a href="/tags/预处理/" style="font-size: 14px;">预处理</a>
    </div>
  </div>

  
    
  <div class="widget-wrap">
    <h3 class="widget-title recent-posts">最新文章</h3>
    <div class="widget">
      <ul>
        
          <li>
            <a href="/2019/08/12/数据结构与算法设计/小甲鱼/查找/">查找</a>
          </li>
        
          <li>
            <a href="/2019/08/05/数据结构与算法设计/小甲鱼/二叉树/">二叉树</a>
          </li>
        
          <li>
            <a href="/2019/08/05/数据结构与算法设计/小甲鱼/树/">树</a>
          </li>
        
          <li>
            <a href="/2019/07/29/English/Writer/money/">money</a>
          </li>
        
          <li>
            <a href="/2019/07/29/English/Words/theme-words/">theme_words</a>
          </li>
        
      </ul>
    </div>
  </div>

  
    
  <div class="widget-wrap">
    <h3 class="widget-title archive">归档</h3>
    <div class="widget">
      <ul class="archive-list"><li class="archive-list-item"><a class="archive-list-link" href="/archives/2019/08/">August 2019</a><span class="archive-list-count">3</span></li><li class="archive-list-item"><a class="archive-list-link" href="/archives/2019/07/">July 2019</a><span class="archive-list-count">10</span></li><li class="archive-list-item"><a class="archive-list-link" href="/archives/2019/06/">June 2019</a><span class="archive-list-count">22</span></li><li class="archive-list-item"><a class="archive-list-link" href="/archives/2019/05/">May 2019</a><span class="archive-list-count">7</span></li><li class="archive-list-item"><a class="archive-list-link" href="/archives/2019/01/">January 2019</a><span class="archive-list-count">2</span></li></ul>
    </div>
  </div>


  
    
<div class="widget-wrap">
    <h3 class="widget-title">Links</h3>
    <div class="widget">
        <ul>
            
            <li>
                <a href="http://yinwang.org">yinwang&#39;s blog</a>
            </li>
            
        </ul>
    </div>
</div>

  
    <!--微信公众号二维码-->


  
</aside>

      </div>
      <footer id="footer">
  
  <div class="outer">
    <div id="footer-left">
      &copy; 2014 - 2019 tiger&nbsp;|&nbsp;
      主题 <a href="https://github.com/giscafer/hexo-theme-cafe/" target="_blank">Cafe</a>
    </div>
     <div id="footer-right">
      联系方式&nbsp;|&nbsp;375478250@qq.com
    </div>
  </div>
</footer>
 <script src="/jquery/jquery.min.js"></script>

 <script src='https://unpkg.com/mermaid@8.1.0/dist/mermaid.min.js'></script>
 <script>
 if (window.mermaid) {
	 mermaid.initialize({startOnLoad:true});
 }
</script>

    </div>
    <nav id="mobile-nav">
  
    <a href="/" class="mobile-nav-link">首页</a>
  
    <a href="/archives" class="mobile-nav-link">归档</a>
  
    <a href="/categories/高等数学" class="mobile-nav-link">高等数学</a>
  
    <a href="/categories/线性代数" class="mobile-nav-link">线性代数</a>
  
    <a href="/categories/数据结构与算法" class="mobile-nav-link">数据结构与算法</a>
  
    <a href="/categories/English" class="mobile-nav-link">英语</a>
  
    <a href="/about" class="mobile-nav-link">关于</a>
  
</nav>
    <img class="back-to-top-btn" src="/images/fly-to-top.png"/>
<script>
// Elevator script included on the page, already.
window.onload = function() {
  var elevator = new Elevator({
    selector:'.back-to-top-btn',
    element: document.querySelector('.back-to-top-btn'),
    duration: 1000 // milliseconds
  });
}
</script>
    <!-- author:forvoid begin -->
<!-- author:forvoid end -->


  
    <script type="text/x-mathjax-config">
      MathJax.Hub.Config({
        tex2jax: {
          inlineMath: [ ['$','$'], ["\\(","\\)"]  ],
          processEscapes: true,
          skipTags: ['script', 'noscript', 'style', 'textarea', 'pre', 'code']
        }
      })
    </script>

    <script type="text/x-mathjax-config">
      MathJax.Hub.Queue(function() {
        var all = MathJax.Hub.getAllJax(), i;
        for (i=0; i < all.length; i += 1) {
          all[i].SourceElement().parentNode.className += ' has-jax';
        }
      })
    </script>
    <script type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.5/MathJax.js?config=TeX-MML-AM_CHTML"></script>
  


 <script src="/js/is.js"></script>


  <link rel="stylesheet" href="/fancybox/jquery.fancybox.css">
  <script src="/fancybox/jquery.fancybox.pack.js"></script>


<script src="/js/script.js"></script>
<script src="/js/elevator.js"></script>
  </div>
</body>
</html>
